/**
 * Created with IntelliJ IDEA.
 * User: ajhin
 * Date: 12/18/12
 * Time: 10:38 PM
 * To change this template use File | Settings | File Templates.
 */
package com.societyGames.codeAlong
{
import com.societyGames.flashForms.CenterScaleTextFieldContainer;

import flash.text.TextField;
import flash.text.TextFormat;
import flash.text.TextFormatAlign;

/**
 * A simple text that says "Loading..." and stays centered.
 */
public class LoadingText extends CenterScaleTextFieldContainer
{
  public function LoadingText()
  {
    initializeInterface();
  }

  private function initializeInterface():void
  {
    var loadingTextField:TextField = new TextField();
    var textFormat:TextFormat = new TextFormat();
    textFormat.align = TextFormatAlign.CENTER;
    textFormat.size = 16;
    loadingTextField.defaultTextFormat = textFormat;
    loadingTextField.multiline = true;

    //Calculate the max size
    loadingTextField.text = "Loading...\nFollow us on Twitter @societygames";

    this.textField = loadingTextField;
  }
}
}
